/* 
 * File:   gstreamer_util.h
 * Author: ufk
 *
 * Created on March 24, 2014, 10:43 PM
 */

#ifndef GSTREAMER_UTIL_H
#define	GSTREAMER_UTIL_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <gstreamer-1.0/gst/gst.h>
    
typedef struct _tux_gst_pipeline tux_gst_pipeline;

void create_loop();
tux_gst_pipeline *tux_gst_create_app_pipeline_without_source(gboolean bus_call (GstBus *, GstMessage *, gpointer),GstFlowReturn new_sample_callback(GstElement *, gpointer data),gpointer data);
gboolean tux_gst_pipeline_add_source(char *source, char *device, tux_gst_pipeline *pipeline);
gboolean tux_gst_pipeline_remove_source(tux_gst_pipeline *pipeline);
gboolean tux_gst_pipeline_replace_source(char *source, char *device, tux_gst_pipeline *pipeline);
void tux_gst_pipeline_free(tux_gst_pipeline *pipeline);
tux_gst_pipeline *tux_gst_create_app_pipeline(char *source, char *device, gboolean bus_call (GstBus *, GstMessage *, gpointer),GstFlowReturn new_sample_callback(GstElement *, gpointer data), gpointer data);
gboolean tux_gst_pipeline_set_state_playing(tux_gst_pipeline *pipeline);
gboolean tux_gst_pipeline_set_state_paused(tux_gst_pipeline *pipeline);
#ifdef	__cplusplus
}
#endif

#endif	/* GSTREAMER_UTIL_H */

